package com.icongyou.enterprise.auth.entity.dto;

import com.icongyou.enterprise.auth.entity.vo.LoginUserVo;

public class UserHolder {
    private static final ThreadLocal<LoginUserVo> tl = new ThreadLocal<>();

    public static void saveUser(LoginUserVo user){
        tl.set(user);
    }

    public static LoginUserVo getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
